<?php


namespace app\validate;


use think\Validate;

class UserValidate extends Validate
{
protected  $rule =[
    'pwd|密码'       =>  'require|max:18|min:6',
    'oldpwd|旧密码'       =>  'require',
    'username|用户名' => 'require|max:10',
    'email|邮箱' => 'require|email',
];

protected $scene =[
    'insertUser' => ['email','pwd','username'],
    'updatePwd' => ['pwd','oldpwd'],
    'updateEmail' => ['email'],
    'updateUsername' => ['username'],
    'login' => ['email','pwd']
];
}